package org.jeecg.modules.system.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.system.entity.CrawlSiteFeatureDoc;
import org.jeecg.modules.system.entity.SysIndexTask;
import org.jeecg.modules.system.mapper.IndexTaskMapper;
import org.jeecg.modules.system.service.ISIndexTaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author wt
 * @Date: 2024/10/11 14:58
 * @Description:
 */
@Slf4j
@Service
public class ISIndexTaskServiceImpl extends ServiceImpl<IndexTaskMapper, SysIndexTask> implements ISIndexTaskService {

    @Autowired
    IndexTaskMapper indexTaskMapper;

    /**
     * 查询
     * @return 结果
     */
    @Override
    public Page<SysIndexTask> pageisIndexTask(Page<SysIndexTask> page, SysIndexTask indexTask) {
        log.info("===indexTask==="+indexTask);
        return page.setRecords(indexTaskMapper.pageisIndexTask(page,indexTask));
    }

    @Override
    public SysIndexTask selectSysIndexTaskId(Long id)
    {
        return indexTaskMapper.selectSysIndexTaskId(id);
    }

    /**
     * 新增
     * @return 结果
     */
    @Override
    public int insertIndexTask(SysIndexTask indexTask)
    {
        return indexTaskMapper.insertIndexTask(indexTask);
    }

    @Override
    public boolean editSysIndexTask(SysIndexTask indexTask)
    {
        return indexTaskMapper.editSysIndexTask(indexTask);
    }

    @Override
    public int deleteWebsite(Long id) {
        return indexTaskMapper.deleteWebsite(id);
    }

    @Override
    public int deleteBatchWebsite(Long[] ids)
    {
        return indexTaskMapper.deleteBatchWebsite(ids);
    }

}
